package susano.demo.action.company;

import susano.demo.service.company.CompanyService;
import susano.presen.controller.Action;
import susano.presen.controller.Navigation;

public class IndexAction extends Action {

	protected CompanyService companyService = new CompanyService();

	@Override
	protected Navigation execute() {
		show();
		return forward("index.jsp");
	}

	@Override
	protected Navigation init() {
		show();
		return forward("index.jsp");
	}

	@Override
	protected Navigation validate() {
		return null;
	}

	private void show() {
		requestScope("activeAccordionNo", 0);
		requestScope("companies", companyService.findAll());
	}

}
